﻿@{
    Layout = "";
}
@using SRM.WebSite.Models.Account;
@model RegisterViewModel;

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>注册新会员</title>
    <!-- Font Awesome -->
    <link rel="stylesheet" href="~/plugins/fontawesome-free/css/all.min.css">
    <!-- icheck bootstrap -->
    <link rel="stylesheet" href="~/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="~/dist/css/adminlte.min.css">
</head>
<body class="hold-transition register-page">
    <div class="register-box">
        <div class="card card-outline card-primary">
            <div class="card-header text-center">
                <a href="JavaScript:void(0);" class="h1"><b></b>注册新会员</a>
            </div>
            <div class="card-body">
                <p class="login-box-msg">
                    注册新会员
                    <div asp-validation-summary="All" class="text-danger"></div>
                </p>

                <form method="post" asp-action="Register">
                    <div class="input-group mb-3">
                        <input type="text" class="form-control" asp-for="UserName" placeholder="请输入用户名...">
                        <div class="input-group-append">
                            <div class="input-group-text">
                                <span class="fas fa-user"></span>
                            </div>
                        </div>
                    </div>
                    <div style="display:none;" class="Supplier">
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" asp-for="SupplierNo" placeholder="请输入供应商编码...">
                            <div class="input-group-append">
                                <div class="input-group-text">
                                    <span class="fas fa-tags"></span>
                                </div>
                            </div>
                        </div>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" asp-for="SupplierName" placeholder="请输入供应商名称...">
                            <div class="input-group-append">
                                <div class="input-group-text">
                                    <span class="fas fa-address-card"></span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="input-group mb-3">
                        <input type="password" class="form-control" asp-for="Password" placeholder="请输入密码...">
                        <div class="input-group-append">
                            <div class="input-group-text">
                                <span class="fas fa-lock"></span>
                            </div>
                        </div>
                    </div>
                    <div class="input-group mb-3">
                        <input type="password" class="form-control" asp-for="ConfirmPassword" placeholder="请输入确认密码...">
                        <div class="input-group-append">
                            <div class="input-group-text">
                                <span class="fas fa-lock"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-8">
                            <div class="checkbox">
                                <label for="agreeTerms">
                                    <input asp-for="IsSupplier" onclick="confirmSupplier(this)" />
                                    @Html.DisplayNameFor(m => m.IsSupplier)
                                </label>
                            </div>
                        </div>
                        <div class="col-4">
                            <button type="submit" class="btn btn-primary btn-block">注册</button>
                        </div>
                    </div>
                </form>

                <a asp-action="Login" class="text-center">返回登录</a>
            </div>
        </div>
    </div>
    <!-- jQuery -->
    <script src="~/plugins/jquery/jquery.min.js"></script>
    <!-- Bootstrap 4 -->
    <script src="~/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
    <!-- AdminLTE App -->
    <script src="~/dist/js/adminlte.min.js"></script>

    <script>
        function confirmSupplier(obj) {
            if (obj.checked) {
                $(".Supplier").css("display", "block");
            } else {
                $(".Supplier").css("display", "none");
            }
        }
    </script>
</body>
</html>
